package com.zone.service.service.impl;

import java.util.List;
import com.zone.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zone.service.mapper.BoxInoutRecordMapper;
import com.zone.service.domain.BoxInoutRecord;
import com.zone.service.service.IBoxInoutRecordService;

/**
 * 款箱出入库记录Service业务层处理
 * 
 * @author liuyang
 * @date 2025-10-31
 */
@Service
public class BoxInoutRecordServiceImpl implements IBoxInoutRecordService 
{
    @Autowired
    private BoxInoutRecordMapper boxInoutRecordMapper;

    /**
     * 查询款箱出入库记录
     * 
     * @param id 款箱出入库记录主键
     * @return 款箱出入库记录
     */
    @Override
    public BoxInoutRecord selectBoxInoutRecordById(Long id)
    {
        return boxInoutRecordMapper.selectBoxInoutRecordById(id);
    }

    /**
     * 查询款箱出入库记录列表
     * 
     * @param boxInoutRecord 款箱出入库记录
     * @return 款箱出入库记录
     */
    @Override
    public List<BoxInoutRecord> selectBoxInoutRecordList(BoxInoutRecord boxInoutRecord)
    {
        return boxInoutRecordMapper.selectBoxInoutRecordList(boxInoutRecord);
    }

    /**
     * 新增款箱出入库记录
     * 
     * @param boxInoutRecord 款箱出入库记录
     * @return 结果
     */
    @Override
    public int insertBoxInoutRecord(BoxInoutRecord boxInoutRecord)
    {
        boxInoutRecord.setCreateTime(DateUtils.getNowDate());
        return boxInoutRecordMapper.insertBoxInoutRecord(boxInoutRecord);
    }

    /**
     * 修改款箱出入库记录
     * 
     * @param boxInoutRecord 款箱出入库记录
     * @return 结果
     */
    @Override
    public int updateBoxInoutRecord(BoxInoutRecord boxInoutRecord)
    {
        boxInoutRecord.setUpdateTime(DateUtils.getNowDate());
        return boxInoutRecordMapper.updateBoxInoutRecord(boxInoutRecord);
    }

    /**
     * 批量删除款箱出入库记录
     * 
     * @param ids 需要删除的款箱出入库记录主键
     * @return 结果
     */
    @Override
    public int deleteBoxInoutRecordByIds(Long[] ids)
    {
        return boxInoutRecordMapper.deleteBoxInoutRecordByIds(ids);
    }

    /**
     * 删除款箱出入库记录信息
     * 
     * @param id 款箱出入库记录主键
     * @return 结果
     */
    @Override
    public int deleteBoxInoutRecordById(Long id)
    {
        return boxInoutRecordMapper.deleteBoxInoutRecordById(id);
    }
    
    /**
     * 批量插入款箱出入库记录数据
     *
     * @param boxInoutRecordList 款箱出入库记录列表
     * @return 结果
     */
    @Override
    public int batchInsertBoxInoutRecord(List<BoxInoutRecord> boxInoutRecordList) {
        return boxInoutRecordMapper.batchInsertBoxInoutRecord(boxInoutRecordList);
    }
}